-- card: 6024 from stack: in -- bmap block id: 4138 -- flags: 4000 -- background id: 5475 -- name: Computer paper ----- HyperTalk script ----- on openCard checkGarbage end openCard -- part 6 (button) -- low flags: 00 -- high flags: A003 -- rect: left=197 top=182 right=261 bottom=304 -- title width / last selected line: 0 -- icon id / first selected line: 5422 / 5422 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Add ICON Buttons ----- HyperTalk script ----- --The basic installer script was written by Mark G. Mendel on mouseUp if the name of the target contains "Remove ICON Buttons" then deinstall else install end if end mouseUp --"ICON Buttons SCRIPT" is the actual script that is being installed. on install set the cursor to 4 set lockScreen to true put the script of stack "Home" into homeScript if "ICON Buttons" is in homeScript then answer "ICON Button is already installed" set the name of the target to "Remove ICON Buttons" checkGarbage exit install end if put return & "-- BEGIN ICON BUTTONS SCRIPT" after homeScript -- add the scripts to the home stack put card field "Home Addition" after homeScript put return & "-- END ICON BUTTONS SCRIPT" after homeScript set the script of stack "home" to homeScript set the name of the target to "Remove ICON Buttons" set the script of this stack to empty answer "Quit HyperCard to add ICON B. to memory." answer "Please quit and restart HyperCard." with ICON_In checkGarbage end install on deinstall set the cursor to 4 set lockScreen to true put the script of stack "Home" into homeScript if "ICON Buttons" is not in homeScript then answer "ICON Buttons is not installed" set the name of the target to "Install ICON Buttons" checkGarbage exit deinstall end if -- delete between "-- BEGIN ICON BUTTONS SCRIPT" and " -- END ICON BUTTONS SCRIPT" put offset(" BEGIN ICON BUTTONS SCRIPT",homeScript)-2 into start put offset(" END ICON BUTTONS SCRIPT",homeScript)+length (" END ICON BUTTONS SCRIPT") into finish delete char start to finish of homeScript set the script of stack "home" to homeScript set the name of the target to "Add ICON BUTTONS" answer "Quit HyperCard to remove ICON B." answer "Please quit and restart HyperCard." with ICON_Gone checkGarbage end deinstall -- part 3 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=228 top=14 right=63 bottom=275 -- title width / last selected line: 0 -- icon id / first selected line: 29019 / 29019 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: up ----- HyperTalk script ----- on mouseUp visual effect scroll down very fast go prev end mouseUp -- part 9 (button) -- low flags: 00 -- high flags: A000 -- rect: left=354 top=258 right=306 bottom=428 -- title width / last selected line: 0 -- icon id / first selected line: 21982 / 21982 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Compact Stack ----- HyperTalk script ----- on mouseUp if the freesize of this stack >0 then put the userLevel into yourLevel --save the current userlevel if the userLevel < 4 then set userLevel to 4 -- "Authoring" if the userLevel < 4 then exit mouseUp domenu "compact stack" set visible of field "trashBytes" to false set userLevel to yourLevel --reset the userlevel how we found it end if end mouseUp -- part 5 (field) -- low flags: 81 -- high flags: 0007 -- rect: left=45 top=29 right=306 bottom=460 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: Home Addition -- part 7 (button) -- low flags: 80 -- high flags: A003 -- rect: left=197 top=313 right=335 bottom=297 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Hide Script ----- HyperTalk script ----- on mouseUp set the scroll of card field "Home Addition" to 0 set visible of card button "Hide Script" to false set visible of card button "Show ICON Buttons Script" to true set visible of card field "Home Addition" to false checkGarbage end mouseUp -- part 8 (button) -- low flags: 00 -- high flags: A003 -- rect: left=155 top=316 right=336 bottom=336 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Show ICON Buttons Script ----- HyperTalk script ----- on mouseUp set visible of card button "Show ICON Buttons Script" to false set visible of card button "Hide Script" to true set visible of card field "Home Addition" to true end mouseUp -- part contents for card part 5 ----- text ----- --ICON Buttons script was edited by Mark Spaulding --The basic design of this Script is from Stack Developer- --Mini HyperStation by Steve Drazga --This script needs the following External resources installed in the Home --Stack: --GetAppIcon XFCN, GetDocIcon XCFN, & UpdateResFork- by J. Paul and --FileName XFCN- by Steve Maller on appButton --This gets the application to make into a button put "Please select Application." put filename("APPL") into LongName if LongName is empty then exit appButton --This makes the button put the userLevel into yourLevel --save the current userlevel if the userLevel < 5 then set userLevel to 5 -- "scripting" if the userLevel < 5 then exit appButton set the cursor to 4 set lockscreen to true doMenu "New Button" set showName of button "New Button" to true set style of button "New Button" to transparent set rect of button "New Button" to 190,100,275,150 --This does the script for the button get script of button "New Button" put "on mouseUp" into appScript put "open"&"e&LongName"e into line 2 of appScript put "end mouseUp" into line 3 of appScript set script of button "New Button" to appScript --This sets the ICON of the button with GetapplIcon XFCN put long name of this stack into thisStack put char 8 to (number of chars in thisStack - 1) of thisStack into thisStack put GetAppIcon(LongName,LongName,thisStack) into iconNum set icon of button "New Button" to iconNum UpdateResFork put ConvertButtonName(LongName) into shortName set name of button "New Button" to shortName set lockScreen to false -- Place the Button where you want it. set cursor to 3 put "Drag the" &"e&shortName"e&& "button to the desired location" wait until the mouse is down repeat until the mouse is up set loc of button shortName to the mouseLoc end repeat set userLevel to yourLevel --reset the userlevel how we found it choose browse tool hide message end appButton on docButton --This determines the application which will open the document put "Please select the Application that created the document." put filename("APPL") into appName if appName is empty then exit docButton --This gets the document to make a button out of put "Please select the Document." --Unfortunately, this will show all files. Inorder to see just one type, --put the “creator” of the file between the parentheses, e.g., ("WDBN") for --Word 3.0X put filename() into longName if longName is empty then exit docButton --This makes the button put the userLevel into yourLevel --save the current userlevel if the userLevel < 5 then set userLevel to 5 -- "scripting" if the userLevel < 5 then exit docButton set the cursor to 4 set lockscreen to true doMenu "New Button" set showName of button "New Button" to true set style of button "New Button" to transparent set rect of button "New Button" to 190,100,275,150 --This does the script for the button get script of button "New Button" put "on mouseUp" into docScript put "open"&"e&LongName"e&&"with"¬ &"e&appName"e into line 2 of docScript put "end mouseUp" into line 3 of docScript set script of button "New Button" to docScript --This sets the ICON of the button using GetDocIcon XCFN put long name of this stack into thisStack put char 8 to (number of chars in thisStack - 1) of thisStack into thisStack put GetDocIcon(appName,LongName,thisStack) into iconNum set icon of button "New Button" to iconNum UpdateResFork put ConvertButtonName(LongName) into shortName set name of button "New Button" to shortName set lockScreen to false -- Place the Button where you want it. set cursor to 3 put "Drag the" &"e&shortName"e&& "button to the desired location" wait until the mouse is down repeat until the mouse is up set loc of button shortName to the mouseLoc end repeat set userLevel to yourLevel --reset the userlevel how we found it choose browse tool hide message end docButton --a needed function for the externalApp & wordDoc handlers --Also by Steve Drazga and Stack Developer function ConvertButtonName LongName put the length of LongName into nameLength repeat with x = nameLength down to 1 if char x of LongName = ":" then exit repeat end repeat return char (x + 1) to nameLength of LongName end ConvertButtonName -- part contents for background part 10 ----- text ----- For Better Efficiency Compact Stack FreeSize = 13 K Available Memory = 373 K